<?php

declare (strict_types=1);

namespace App\Common\Model\System;

use Zms\Basics\BasicsModel;
use Zms\HyperfCasts\JsonCasts;
use Zms\HyperfCasts\StrtotimeCasts;

/**
 * @property string $sign 调用值
 * @property array $value 数据
 * @property int $expiration_time 有效期
 */
class CachingModel extends BasicsModel
{

    public bool $timestamps = false;

    protected string $primaryKey = 'sign';

    public bool $incrementing = false;

    public string $keyType = 'string';

    /**
     * The table associated with the model.
     *
     * @var ?string
     */
    protected ?string $table = 'system_caching';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected array $fillable = [];

    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected array $casts = [
        'expiration_time' => StrtotimeCasts::class,
        'value' => JsonCasts::class,
    ];
}
